#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
    int a;
    int b;
    scanf("%d%d", &a, &b);
    int i = a;
    int count = 0;
    int k = 0;
    for (i = a; i <= b; i++)
    {
        int flag = 1;
        int j = 2;
        for (j = 2; j <= i - 1; j++)
        {
            if (i % j == 0)
            {
                flag = 0;
                break;
            }


        }
        if (flag)
        {
            printf("%d ", i);
            k++;
            count++;
        }
        if (count == 7)
        {
            printf("\n");
            count = 0;
        }
    }

    if (k == 0)
    {
        printf("no");
    }
    return 0;
}